﻿using GraphProcessor;
using IQIGame.Onigao.Logic;
using LFloatMath.Math;
using UnityEngine;

namespace IQIGame.Onigao.GamePlay.Editors
{
    [System.Serializable, NodeMenuItem(SkillEditorConst.Target + "/" + SkillEditorConst.InputUnit, typeof(SkillEditorGraph))]
    public class SkillTargetSelectNode_InputUnit : SkillTargetSelectNode
    {
        [InspectorName("范围")] public float range;
        protected override ETargetSelectType targetType => ETargetSelectType.InputUnit;
        protected override bool checkRelation => true;

        protected override SkillCustomConfig CreateConfig()
        {
            return new TargetSelect_InputUnit_ConfigData()
            {
                range = (this.range.ToLFloat())._val,
            };
        }
    }
}